package day230427;

import java.util.Scanner;

/**
 * @author 兴趣使然黄小黄
 * @version 1.0
 * @date 2023/4/28 13:52
 * 养兔子
 */
public class Main02 {

    // 1 2 3 5 8 13 21...
    static long[] fib = new long[90]; // 数据范围为90以内

    public static void main(String[] args) {
        // 先初始化斐波那契数列
        fib[0] = 1L;
        fib[1] = 2L;
        for (int i = 2; i < fib.length; i++) {
            fib[i] = fib[i-1] + fib[i-2];
        }
        // 循环处理输入
        Scanner scan = new Scanner(System.in);
        while (scan.hasNextInt()) {
            int n = scan.nextInt();
            System.out.println(fib[n-1]);
        }
        scan.close();
    }
}
